import { MiddlewareConsumer, Module, NestModule } from "@nestjs/common";
import { AppController } from "./app.controller";
import { AppService } from "./app.service";
import { ConfigurationModule } from "./common/configuration.module";
import { UserModule } from "./user/user.module";
import { ArticleModule } from "./article/article.module";
import { RSSModule } from "./rss/rss.module";
import { PageRenderModule } from "./page/page.module";
import { AndroidModule } from "./android/android.module";
import { ResourceModule } from "./resource/resource.module";
import { ToolModule } from "./tool/tool.module";
import { WXModule } from "./wx/wx.module";
import { PrismaModule } from "./common/prisma.module";
import { InformationModule } from "./common/information.module";
import { EmailModule } from "./common/email.module";
import { ArticleArchiveModule } from "./article/archive.module";
import { ArticleTagModule } from "./article/tag.module";
import { ArticleSetModule } from "./article/set.module";
import { ArticleLikeModule } from "./article/like.module";
import { ArticleCommentModule } from "./article/comment.module";
import { AdminModule } from "./admin/admin.module";

@Module({
  imports: [
    // global module
    PrismaModule,
    InformationModule,
    EmailModule,

    // configuration
    ConfigurationModule,

    // server basic
    UserModule,
    ResourceModule,
    ArticleModule,
    ArticleArchiveModule,
    ArticleTagModule,
    ArticleSetModule,
    ArticleLikeModule,
    ArticleCommentModule,
    ToolModule,

    // server extra
    PageRenderModule,
    RSSModule,
    WXModule,
    AndroidModule,

    // admin
    AdminModule,
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule implements NestModule {
  configure(_consumer: MiddlewareConsumer) {}
}
